namespace Dorm.QueryObject
{
    public class OrderByExpression
    {
        public string PropertyName { get; set; }
        public bool Ascending { get; set; }

        public OrderByExpression()
        {
            Ascending = true;
        }

        public override string ToString()
        {
            var direction = Ascending ? "ASC" : "DESC";
            return PropertyName + " " + direction;
        }
    }
}
